﻿<%@ Page Language="C#" MasterPageFile="~/design/Anonym.Master" AutoEventWireup="true"
    CodeBehind="Vystavy.aspx.cs" Inherits="Zadani09.Vystavy" Title="Přehled výstav" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentVrchniPlaceholder" runat="server">
    <h3 style="font-size: small; margin-bottom: 2px">
        Přehled všech výstav</h3>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline">
        <ContentTemplate>
            <asp:TextBox ID="TextBox1" runat="server">
            </asp:TextBox>
            <cc1:AutoCompleteExtender ID="TextBox1_AutoCompleteExtender" runat="server" DelimiterCharacters=""
                Enabled="True" ServicePath="" TargetControlID="TextBox1" UseContextKey="True"
                ServiceMethod="GetCompletionList" MinimumPrefixLength="1">
            </cc1:AutoCompleteExtender>
            &nbsp;
            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
                <asp:ListItem Value="id_vystava" Text="ID výstavy"></asp:ListItem>
                <asp:ListItem Value="jmeno" Text="Jméno"></asp:ListItem>
                <asp:ListItem Value="popis" Text="Popis"></asp:ListItem>
                <asp:ListItem Value="dlouhy_popis" Text="Dlouhý popis"></asp:ListItem>
                <asp:ListItem Value="vernisaz" Text="Vernisáž"></asp:ListItem>
                <asp:ListItem Value="zacatek" Text="Začátek"></asp:ListItem>
                <asp:ListItem Value="konec" Text="Konec"></asp:ListItem>
                <asp:ListItem Value="oteviraci_doba" Text="Otevírací doba"></asp:ListItem>
                <asp:ListItem Value="cena_vstupenky_dospeli" Text="Cena vstupenky dospělí"></asp:ListItem>
                <asp:ListItem Value="cena_vstupenky_deti" Text="Cena vstupenky děti"></asp:ListItem>
            </asp:DropDownList>
        </ContentTemplate>
    </asp:UpdatePanel>
    &nbsp;
    <asp:Button ID="Button2" runat="server" Text="Vyhledat" Font-Size="12px" OnClick="Button2_Click" />
    <br />
    <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Small"></asp:Label>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" CellPadding="2"
        DataKeyNames="IDVystava" DataSourceID="ObjectDataSource1" ForeColor="Black" GridLines="None"
        CssClass="mar_top_3" Width="740px">
        <FooterStyle BackColor="Tan" />
        <Columns>
            <asp:CommandField SelectText="Detail" ShowSelectButton="True">
                <ItemStyle Font-Bold="true" />
            </asp:CommandField>
            <asp:BoundField DataField="Jmeno" HeaderText="Jméno" SortExpression="Jmeno" />
            <asp:BoundField DataField="Vernisaz" HeaderText="Vernisáž" SortExpression="Vernisaz" />
            <asp:BoundField DataField="Zacatek" HeaderText="Začátek" SortExpression="Zacatek" />
            <asp:BoundField DataField="Konec" HeaderText="Konec" SortExpression="Konec" />
            <asp:BoundField DataField="OteviraciDoba" HeaderText="Otevírací doba" SortExpression="OteviraciDoba" />
            <asp:BoundField DataField="CenaVstupenkyDeti" HeaderText="CenaVstupenkyDeti" SortExpression="CenaVstupenkyDeti"
                Visible="False" />
            <asp:BoundField DataField="CenaVstupenkyDospeli" HeaderText="CenaVstupenkyDospeli"
                SortExpression="CenaVstupenkyDospeli" Visible="False" />
            <asp:BoundField DataField="DlouhyPopis" HeaderText="DlouhyPopis" SortExpression="DlouhyPopis"
                Visible="False" />
            <asp:BoundField DataField="IDGalerie" HeaderText="IDGalerie" SortExpression="IDGalerie"
                Visible="False" />
            <asp:BoundField DataField="IDVystava" HeaderText="IDVystava" SortExpression="IDVystava"
                Visible="False" />
            <asp:BoundField DataField="Popis" HeaderText="Popis" SortExpression="Popis" Visible="False" />
            <asp:BoundField DataField="Stav" HeaderText="Stav" SortExpression="Stav" Visible="False" />
        </Columns>
        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
        <HeaderStyle BackColor="Tan" Font-Bold="True" />
        <AlternatingRowStyle BackColor="PaleGoldenrod" />
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="cti_s_vyhledavanim" TypeName="Zadani09.db.ODS.VystavaDataObject">
        <SelectParameters>
            <asp:Parameter Name="razeni" Type="String" />
            <asp:ControlParameter ControlID="TextBox1" DefaultValue="" Name="hledano" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="DropDownList1" DefaultValue="id_umelec" Name="atribut"
                PropertyName="SelectedValue" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox1"
        ValidationGroup="jinagrupax"></asp:RequiredFieldValidator>
    <asp:Label ID="Label2" runat="server" Visible="False"><h3 style="margin-bottom: 2px">Detailní informace o výstavě</h3></asp:Label>
    <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource2" Width="449px"
        DataKeyNames="IDVystava" BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px"
        CellPadding="2" ForeColor="Black">
        <FooterStyle BackColor="Tan" />
        <EditItemTemplate>
            CenaVstupenkyDeti:
            <asp:TextBox ID="CenaVstupenkyDetiTextBox" runat="server" Text='<%# Bind("CenaVstupenkyDeti") %>' />
            <br />
            CenaVstupenkyDospeli:
            <asp:TextBox ID="CenaVstupenkyDospeliTextBox" runat="server" Text='<%# Bind("CenaVstupenkyDospeli") %>' />
            <br />
            DlouhyPopis:
            <asp:TextBox ID="DlouhyPopisTextBox" runat="server" Text='<%# Bind("DlouhyPopis") %>' />
            <br />
            IDGalerie:
            <asp:TextBox ID="IDGalerieTextBox" runat="server" Text='<%# Bind("IDGalerie") %>' />
            <br />
            IDVystava:
            <asp:TextBox ID="IDVystavaTextBox" runat="server" Text='<%# Bind("IDVystava") %>' />
            <br />
            Jmeno:
            <asp:TextBox ID="JmenoTextBox" runat="server" Text='<%# Bind("Jmeno") %>' />
            <br />
            Konec:
            <asp:TextBox ID="KonecTextBox" runat="server" Text='<%# Bind("Konec") %>' />
            <br />
            OteviraciDoba:
            <asp:TextBox ID="OteviraciDobaTextBox" runat="server" Text='<%# Bind("OteviraciDoba") %>' />
            <br />
            Popis:
            <asp:TextBox ID="PopisTextBox" runat="server" Text='<%# Bind("Popis") %>' />
            <br />
            Stav:
            <asp:TextBox ID="StavTextBox" runat="server" Text='<%# Bind("Stav") %>' />
            <br />
            Vernisaz:
            <asp:TextBox ID="VernisazTextBox" runat="server" Text='<%# Bind("Vernisaz") %>' />
            <br />
            Zacatek:
            <asp:TextBox ID="ZacatekTextBox" runat="server" Text='<%# Bind("Zacatek") %>' />
            <br />
            Vstupenka:
            <asp:TextBox ID="VstupenkaTextBox" runat="server" Text='<%# Bind("Vstupenka") %>' />
            <br />
            VystavaDilo:
            <asp:TextBox ID="VystavaDiloTextBox" runat="server" Text='<%# Bind("VystavaDilo") %>' />
            <br />
            Galerie:
            <asp:TextBox ID="GalerieTextBox" runat="server" Text='<%# Bind("Galerie") %>' />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                Text="Update" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False"
                CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <InsertItemTemplate>
            CenaVstupenkyDeti:
            <asp:TextBox ID="CenaVstupenkyDetiTextBox" runat="server" Text='<%# Bind("CenaVstupenkyDeti") %>' />
            <br />
            CenaVstupenkyDospeli:
            <asp:TextBox ID="CenaVstupenkyDospeliTextBox" runat="server" Text='<%# Bind("CenaVstupenkyDospeli") %>' />
            <br />
            DlouhyPopis:
            <asp:TextBox ID="DlouhyPopisTextBox" runat="server" Text='<%# Bind("DlouhyPopis") %>' />
            <br />
            IDGalerie:
            <asp:TextBox ID="IDGalerieTextBox" runat="server" Text='<%# Bind("IDGalerie") %>' />
            <br />
            IDVystava:
            <asp:TextBox ID="IDVystavaTextBox" runat="server" Text='<%# Bind("IDVystava") %>' />
            <br />
            Jmeno:
            <asp:TextBox ID="JmenoTextBox" runat="server" Text='<%# Bind("Jmeno") %>' />
            <br />
            Konec:
            <asp:TextBox ID="KonecTextBox" runat="server" Text='<%# Bind("Konec") %>' />
            <br />
            OteviraciDoba:
            <asp:TextBox ID="OteviraciDobaTextBox" runat="server" Text='<%# Bind("OteviraciDoba") %>' />
            <br />
            Popis:
            <asp:TextBox ID="PopisTextBox" runat="server" Text='<%# Bind("Popis") %>' />
            <br />
            Stav:
            <asp:TextBox ID="StavTextBox" runat="server" Text='<%# Bind("Stav") %>' />
            <br />
            Vernisaz:
            <asp:TextBox ID="VernisazTextBox" runat="server" Text='<%# Bind("Vernisaz") %>' />
            <br />
            Zacatek:
            <asp:TextBox ID="ZacatekTextBox" runat="server" Text='<%# Bind("Zacatek") %>' />
            <br />
            Vstupenka:
            <asp:TextBox ID="VstupenkaTextBox" runat="server" Text='<%# Bind("Vstupenka") %>' />
            <br />
            VystavaDilo:
            <asp:TextBox ID="VystavaDiloTextBox" runat="server" Text='<%# Bind("VystavaDilo") %>' />
            <br />
            Galerie:
            <asp:TextBox ID="GalerieTextBox" runat="server" Text='<%# Bind("Galerie") %>' />
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                Text="Insert" />
            &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
                CommandName="Cancel" Text="Cancel" />
        </InsertItemTemplate>
        <ItemTemplate>
            <table>
                <tr>
                    <td>
                        <strong>Jméno výstavy:</strong>
                    </td>
                    <td>
                        <asp:Label ID="JmenoLabel" runat="server" Text='<%# Eval("Jmeno") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Vernisáž:</strong>
                    </td>
                    <td>
                        <asp:Label ID="VernisazLabel" runat="server" Text='<%# Bind("Vernisaz") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Začátek:</strong>
                    </td>
                    <td>
                        <asp:Label ID="ZacatekLabel" runat="server" Text='<%# Bind("Zacatek") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Konec:</strong>
                    </td>
                    <td>
                        <asp:Label ID="KonecLabel" runat="server" Text='<%# Bind("Konec") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Otevírací doba:</strong>
                    </td>
                    <td>
                        <asp:Label ID="OteviraciDobaLabel" runat="server" Text='<%# Bind("OteviraciDoba") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Cena vstupenky pro děti:</strong>
                    </td>
                    <td>
                        <asp:Label ID="CenaVstupenkyDetiLabel" runat="server" Text='<%# Bind("CenaVstupenkyDeti") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Cena vstupenky pro dospělé:</strong>
                    </td>
                    <td>
                        <asp:Label ID="CenaVstupenkyDospeliLabel" runat="server" Text='<%# Bind("CenaVstupenkyDospeli") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Popis:</strong>
                    </td>
                    <td>
                        <asp:Label ID="PopisLabel" runat="server" Text='<%# Bind("Popis") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Podrobnější popis:</strong>
                    </td>
                    <td>
                        <asp:Label ID="DlouhyPopisLabel" runat="server" Text='<%# Bind("DlouhyPopis") %>' />
                    </td>
                </tr>
            </table>
        </ItemTemplate>
        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
        <HeaderStyle BackColor="Tan" Font-Bold="True" />
        <EditRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
    </asp:FormView>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="ctiJednu" TypeName="Zadani09.db.ODS.VystavaDataObject">
        <SelectParameters>
            <asp:ControlParameter ControlID="GridView1" DefaultValue="0" Name="id" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <span style="width: 520px; text-align: center; display: block;">
        <asp:Label ID="RezervaceLabel" runat="server" Text="Rezervovat lístky" onClick="schovat('rezervForm')"
            Style="cursor: pointer; font-weight: bold;"></asp:Label>
    </span>
    <div id="rezervForm" style="visibility: hidden">
        <asp:Panel ID="PanelRezervace" runat="server" Style="text-align: center;">
            <table cellspacing="3">
                <tr>
                    <td>
                        Datum:
                    </td>
                    <td>
                        <asp:Label ID="DatumLabel" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        Počet lístků pro dospělé:
                    </td>
                    <td>
                        <asp:TextBox ID="PocetProDospeleTextBox" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Zadejte počet !"
                            ControlToValidate="PocetProDospeleTextBox" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        Počet lístků pro děti:
                    </td>
                    <td>
                        <asp:TextBox ID="PocetProDetiTextBox" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Zadejte počet !"
                            ControlToValidate="PocetProDetiTextBox" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <asp:Button ID="RezervaceButton" runat="server" Text="Rezervovat" Style="height: 20px;
                            border: solid 1px black; background-color: Transparent; font: 11px Tahoma, sans-serif;" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
</asp:Content>
